home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / SCREEN / VIRTSCR1.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-16  |  1KB  |  34 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Demonstration; virtual screen handling #1 - virtual text writes
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBSCR, CRT;
  10.  
  11. const SomeData : char = #177;
  12. var   VirtualScreen : VirtualScreenObjectType;
  13.  
  14.  
  15. begin
  16.      Screen.Clear; { Clear the physical screen }
  17.  
  18.      with VirtualScreen do begin
  19.           InitializeRegion (1, 1, 80, 25);
  20.           Store;
  21.  
  22.           { Use some of ScreenObjectType's methods on the virtual screen
  23.             (all inherited methods are adjusted to work virtually). }
  24.           WriteXYColor (65, 25, 'Virtual writing!', LightCyan, Black);
  25.           FillArea (1, 1, 20, 10, #219, LightBlue);
  26.           FillArea (60, 1, 80, 10, #219, Blue);
  27.  
  28.           Delay (1000); { Just wait to show the empty screen }
  29.  
  30.           InterceptRegion; { Restore the virtual screen on the physical screen }
  31.  
  32.           Delay (1000); { Show the result of virtual writing }
  33.      end;
  34. end.